<!DOCTYPE html>
<!-- saved from url=(0016)http://localhost -->
<html>
  <head>
    <meta charset="utf-8"/>
    <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
    <title>项目组件结构</title>
    <style>
        body{
            margin: 0;
        }
        #content-info{
            width: auto;
            margin: 0 auto;
            text-align: center;
        }
        #author-info{
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
        }
        #title{
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
            padding-top: 10px;
            margin-bottom: 2px;
            font-size: 34px;
            color: #505050;
        }
        .text{
            white-space:nowrap;
            text-overflow: ellipsis;
            display: inline-block;
            margin-right: 20px;
            margin-bottom: 2px;
            font-size: 20px;
            color: #8c8c8c;
        }
        #navBar{
            position: fixed;
            right:0;
            bottom: 0;
            background-color: #f0f3f4;
            overflow-y: auto;
            text-align: center;
        }
        #svg-container{
            width: 100%;
            min-width: 0;
            margin: 0 10px;
        }
        #nav-thumbs{
            padding: 0 5px;
        }
        .nav-thumb{
            position: relative;
            margin: 10px auto;
        }
        .nav-thumb >p{
            text-align: center;
            font-size: 12px;
            margin: 4px 0 0 0;
        }
        .nav-thumb >div{
            position: relative;
            display: inline-block;
            border: 1px solid #c6cfd5;
        }
        .nav-thumb img{
            display: block;
        }
        .nav-thumb span{
            pointer-events: none;
        }
        #main-content{
            bottom: 0;
            left: 0;
            right: 0;
            background-color: #d0cfd8;
            display: flex;
            height: auto;
            flex-flow: row wrap;
            text-align:center;
        }
        #svg-container >svg{
            display: block;
            margin:10px auto;
            margin-bottom: 0;
        }
        #copyright{
            bottom: 0;
            left: 50%;
            margin: 5px auto;
            font-size: 16px;
            color: #515151;
        }
        #copyright >a{
            text-decoration: none;
            color: #77C;
        }
        .number{
            position: absolute;
            top:0;
            left:0;
            border-top:22px solid #76838f;
            border-right: 22px solid transparent;
        }
        .pagenum{
            font-size: 12px;
            color: #fff;
            position: absolute;
            top: -23px;
            left: 2px;
        }
        #navBar::-webkit-scrollbar{
            width: 8px;
            background-color: #f5f5f5;
        }
        #navBar::-webkit-scrollbar-track{
            -webkit-box-shadow: inset 0 0 4px rgba(0,0,0,.3);
            border-radius: 8px;
            background-color: #fff;
        }
        #navBar::-webkit-scrollbar-thumb{
            border-radius: 8px;
            -webkit-box-shadow: inset 0 0 4px rgba(0,0,0,.3);
            background-color: #6b6b70;
        }
        #navBar::-webkit-scrollbar-thumb:hover{
            background-color: #4a4a4f;
        }
        .nav-thumb >div:hover{
            box-shadow:1px 1px 4px rgba(0,0,0,.4);
        }
        .selected .number{
            border-color: #08a1ef transparent;
        }
</style>
  </head>
  <body>
    <div id="main-area">
      <div id="content-info">
        <div id="title">项目组件结构</div>
        <div id="author-info">
          <div id="author-name" class="text">蒙克雨</div>
          <div id="share-time" class="text">2022-02-09</div>
        </div>
      </div>
      <div id="main-content">
        <div id="svg-container"><svg xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" id="page1" xmlns:xlink="http://www.w3.org/1999/xlink" width="1122" viewBox="0 0 1123 2381" preserveAspectRadio="xMinYMin meet" height="2381"><defs/><rect x="0" width="1123" y="0" fill="#ffffff" stroke="#808080" height="2381"/><g id="group1" transform="translate(57.00,132.00)"><path stroke-width="1" id="shape2" fill="#b0b4df" stroke="#101843" d="M11.0,.0L417.7,.0C423.8,.0,428.7,4.9,428.7,11.0L428.7,395.3C428.7,401.4,423.8,406.3,417.7,406.3L11.0,406.3C4.9,406.3,.0,401.4,.0,395.3L.0,11.0C.0,4.9,4.9,.0,11.0,.0z" fill-rule="nonzero"/></g><g id="shape3" transform="translate(92.06,148.26)"><text xml:space="preserve" style="fill:#191919;font-family:Microsoft YaHei UI;font-size:9.00pt"><tspan x="4.4" y="21.5">.例子 palmVein掌静脉组件包 </tspan><tspan x="4.4" y="38.5">├── bin_pack   # 打包目录 </tspan><tspan x="4.4" y="55.5">├── fun_modle # 第三方库源码依赖和库依赖存放位置 </tspan><tspan x="4.4" y="72.5">│     ├── dbserver # 子模块组件 </tspan><tspan x="4.4" y="89.5">│     ├── http_daemon           </tspan><tspan x="4.4" y="106.5">│     ├── ipc-daemon           </tspan><tspan x="4.4" y="123.5">│     ├── ipcweb-backend       </tspan><tspan x="4.4" y="140.5">│     ├── mqtt_daemon           </tspan><tspan x="4.4" y="157.5">│     ├── netserver                   </tspan><tspan x="4.4" y="174.5">│     ├── upgrade_server       </tspan><tspan x="4.4" y="191.5">│     └── netserver</tspan><tspan x="4.4" y="208.5">├── scripts # 存放工作脚本 </tspan><tspan x="4.4" y="225.5">│     ├── scripts_config # 配置文件 需要拷贝到 /home/ </tspan><tspan x="4.4" y="242.5">│            ├── build.sh # 编译 </tspan><tspan x="4.4" y="259.5">│            └── update_all_mudmole.sh # 更新子模块 </tspan><tspan x="4.4" y="276.5">│     ├── conf # 基础组件脚本 配置目录</tspan><tspan x="4.4" y="293.5">│            ├── base_conf.sh   # 配置文件 </tspan><tspan x="4.4" y="310.5">│            └── version.hpp.in # 版本控制模板文件 </tspan><tspan x="4.4" y="327.5">│     └── task.sh # 一键清理/编译/安装/打包/部署工作流 </tspan><tspan x="4.4" y="344.5">├── .env #默认项目配置文件 </tspan><tspan x="4.4" y="361.5">├── .gitignore </tspan><tspan x="4.4" y="378.5">├── .gitmodules</tspan></text></g><g id="group4" transform="translate(648.26,9.30)"><path stroke-width="1" id="shape5" fill="#b0b4df" stroke="#101843" d="M11.0,.0L417.7,.0C423.8,.0,428.7,4.9,428.7,11.0L428.7,1688.0C428.7,1694.1,423.8,1699.0,417.7,1699.0L11.0,1699.0C4.9,1699.0,.0,1694.1,.0,1688.0L.0,11.0C.0,4.9,4.9,.0,11.0,.0z" fill-rule="nonzero"/></g><g id="shape6" transform="translate(670.76,17.80)"><text xml:space="preserve" style="fill:#191919;font-family:Microsoft YaHei UI;font-size:9.00pt"><tspan x="4.4" y="21.0">.例子 upgrade_server组件 </tspan><tspan x="4.4" y="38.0">├── 3rdparty # 第三方库源码依赖和库依赖存放位置 </tspan><tspan x="4.4" y="55.0">│     ├── CMakeLists.txt # 第三方库源码依赖编译CMakeLists文件 </tspan><tspan x="4.4" y="72.0">│     ├── libIPCProtocol # 源码依赖libIPCProtocol 组件结构 </tspan><tspan x="4.4" y="89.0">│     └── target # 库依赖存放目录 </tspan><tspan x="4.4" y="106.0">│            ├── linux_armv7-a # 以平台和架构命名区分 </tspan><tspan x="4.4" y="123.0">│                   ├── include # 头文件存放目录 </tspan><tspan x="4.4" y="140.0">│                   └── lib # 库文件存放目录 </tspan><tspan x="4.4" y="157.0">│            ├── linux_x86-64 </tspan><tspan x="4.4" y="174.0">│                   ├── include </tspan><tspan x="4.4" y="191.0">│                   └── lib </tspan><tspan x="4.4" y="208.0">│            └── windows_x86-64 </tspan><tspan x="4.4" y="225.0">│                   ├── include </tspan><tspan x="4.4" y="242.0">│                   └── lib </tspan><tspan x="4.4" y="259.0">├── bin # 存放项目make install后的文件 </tspan><tspan x="4.4" y="276.0">│     ├── linux_armv7-a_Release </tspan><tspan x="4.4" y="293.0">│            ├── include # 存放头文件 </tspan><tspan x="4.4" y="310.0">│            ├── bin # 存放可执行文件 </tspan><tspan x="4.4" y="327.0">│            └── lib # 存放库文件 </tspan><tspan x="4.4" y="344.0">│     └── linux_armv7-a_Debug </tspan><tspan x="4.4" y="361.0">│            ├── include # 存放头文件 </tspan><tspan x="4.4" y="378.0">│            ├── bin # 存放可执行文件 </tspan><tspan x="4.4" y="395.0">│            └── lib # 存放库文件 </tspan><tspan x="4.4" y="412.0">├── build # 存放项目编译文件 </tspan><tspan x="4.4" y="429.0">├── cmake # 存放项目相关的cmake工具 </tspan><tspan x="4.4" y="446.0">│     ├── load_curl.cmake # 依赖库配置文件 </tspan><tspan x="4.4" y="463.0">│     ├── load_gtest.cmake </tspan><tspan x="4.4" y="480.0">│     ├── load_jsonc.cmake </tspan><tspan x="4.4" y="497.0">│     ├── load_jsoncpp.cmake </tspan><tspan x="4.4" y="514.0">│     ├── load_libcryptopp.cmake </tspan><tspan x="4.4" y="531.0">│     ├── load_libemb.cmake </tspan><tspan x="4.4" y="548.0">│     ├── load_libIPCProtocol.cmake </tspan><tspan x="4.4" y="565.0">│     ├── load_libzip.cmake </tspan><tspan x="4.4" y="582.0">│     ├── load_spdlog.cmake </tspan><tspan x="4.4" y="599.0">│     ├── messagecolor.cmake # 彩色消息输出 </tspan><tspan x="4.4" y="616.0">│     ├── toolchain_options.cmake # 编译配置项 </tspan><tspan x="4.4" y="633.0">│     └── utils.cmake # 版本管理组件 </tspan><tspan x="4.4" y="650.0">├── conf # 项目配置文件存放目录 </tspan><tspan x="4.4" y="667.0">│     ├── dbus # 配置文件 </tspan><tspan x="4.4" y="684.0">│            └── upserver.conf </tspan><tspan x="4.4" y="701.0">│     ├── other_data.db.20220105 # 数据库文件</tspan><tspan x="4.4" y="718.0">│     └── README.md # 项目说明 </tspan><tspan x="4.4" y="735.0">├── doc # 项目文档存放目录 </tspan><tspan x="4.4" y="752.0">├── platforms # 项目平台性相关内容存放目录，包括交叉编译 </tspan><tspan x="4.4" y="769.0">│     ├── linux </tspan><tspan x="4.4" y="786.0">│            ├── rv1126-toolchain-bbd.cmake # 交叉编译工具链 </tspan><tspan x="4.4" y="803.0">│            ├── rv1126-toolchain-mky.cmake # 交叉编译工具链 </tspan><tspan x="4.4" y="820.0">│     └── arm.himix200.cmake </tspan><tspan x="4.4" y="837.0">├── scripts # 相关脚本存放目录，包括持续集成和部署相关 </tspan><tspan x="4.4" y="854.0">│     ├── base_scripts # 基础组件脚本 </tspan><tspan x="4.4" y="871.0">│            ├── build.sh # 编译 </tspan><tspan x="4.4" y="888.0">│            ├── clean.sh # 清理 </tspan><tspan x="4.4" y="905.0">│            ├── dos2unix.sh # win2linux </tspan><tspan x="4.4" y="922.0">│            ├── login.sh # 登录 </tspan><tspan x="4.4" y="939.0">│            ├── pack.sh # 打包 默认输出到根目录 pack目录 </tspan><tspan x="4.4" y="956.0">│            ├── remote_install.sh # 自动部署 </tspan><tspan x="4.4" y="973.0">│            └── update_all_mudmole.sh # 更新 </tspan><tspan x="4.4" y="990.0">│     ├── conf # 基础组件脚本 配置目录</tspan><tspan x="4.4" y="1007.0">│            ├── base_conf.sh   # 配置文件 </tspan><tspan x="4.4" y="1024.0">│            └── version.hpp.in # 版本控制模板文件 </tspan><tspan x="4.4" y="1041.0">│     └── task.sh # 一键清理/编译/安装/打包/部署工作流 </tspan><tspan x="4.4" y="1058.0">├── src # 项目源码目录 </tspan><tspan x="4.4" y="1075.0">│     ├── UpgradeServer # 以文件夹分割/物理隔离各模块代码 </tspan><tspan x="4.4" y="1092.0">│            ├── AesMgr </tspan><tspan x="4.4" y="1109.0">│                   ├── aes_mgr.cpp </tspan><tspan x="4.4" y="1126.0">│                   ├── aes_mgr.h </tspan><tspan x="4.4" y="1143.0">│                   ├── aes_pre.h </tspan><tspan x="4.4" y="1160.0">│                   └── aes_transfer.h </tspan><tspan x="4.4" y="1177.0">│            ├── BuilderPattern </tspan><tspan x="4.4" y="1194.0">│            ├── Common # 公共 </tspan><tspan x="4.4" y="1211.0">│                   ├── common.hpp # 公共头 </tspan><tspan x="4.4" y="1228.0">│                   └── version.hpp   # 版本管理 </tspan><tspan x="4.4" y="1245.0">│            ├── CurlMgr </tspan><tspan x="4.4" y="1262.0">│            ├── DbusMgr </tspan><tspan x="4.4" y="1279.0">│            ├── FaceTerminalBuilder </tspan><tspan x="4.4" y="1296.0">│            ├── logger # 日志和崩溃诊断</tspan><tspan x="4.4" y="1313.0">│            ├── Main </tspan><tspan x="4.4" y="1330.0">│            ├── Md5Mgr </tspan><tspan x="4.4" y="1347.0">│            ├── MemTrack # 内存管理 </tspan><tspan x="4.4" y="1364.0">│            ├── RoutMgr    # 消息路由 </tspan><tspan x="4.4" y="1381.0">│            ├── RsaMgr </tspan><tspan x="4.4" y="1398.0">│            ├── ThreadPoolMgr </tspan><tspan x="4.4" y="1415.0">│            ├── UpgradeMgr </tspan><tspan x="4.4" y="1432.0">│            ├── ZipMgr </tspan><tspan x="4.4" y="1449.0">│            └── CMakeLists.txt </tspan><tspan x="4.4" y="1466.0">│            ├── CMakeLists.txt </tspan><tspan x="4.4" y="1483.0">└── tests # 测试示例源码存放目录 </tspan><tspan x="4.4" y="1500.0">│     ├── fixture # 测试夹层套件 </tspan><tspan x="4.4" y="1517.0">│     ├── global </tspan><tspan x="4.4" y="1534.0">│     ├── test_case </tspan><tspan x="4.4" y="1551.0">│     ├── test_func </tspan><tspan x="4.4" y="1568.0">│     └── main.cpp </tspan><tspan x="4.4" y="1585.0">├── CMakeLists.txt </tspan><tspan x="4.4" y="1602.0">├── .env #默认项目配置文件 </tspan><tspan x="4.4" y="1619.0">├── .gitignore  </tspan><tspan x="4.4" y="1636.0">├── .gitmodules # git子模块配置 </tspan><tspan x="4.4" y="1653.0">├── CMakeLists.txt # 项目根目录CMakeLists文件，cmake入口文</tspan><tspan x="4.4" y="1670.0">件 </tspan><tspan x="4.4" y="1687.0">└── CMakeSettings.json # vs 远程开发配置 </tspan></text></g><g id="shape7" transform="translate(27.26,9.30)"><text xml:space="preserve" style="fill:#191919;font-family:微软雅黑;font-size:10.00pt"><tspan x="8.4" y="23.1">组件式开发结构研究</tspan></text></g><g id="shape8" transform="translate(59.13,43.30)"><text xml:space="preserve" style="fill:#191919;font-family:微软雅黑;font-size:10.00pt"><tspan x="4.8" y="19.5">这里引入组件和组件包的概念，以掌静脉项目为例</tspan></text></g><g id="shape9" transform="translate(189.00,132.00)"><text xml:space="preserve" style="fill:#191919;font-family:微软雅黑;font-size:10.00pt"><tspan x="27.5" y="23.0">组件包样例</tspan></text></g><g id="shape10" transform="translate(811.76,9.30)"><text xml:space="preserve" style="fill:#191919;font-family:Microsoft YaHei UI;font-size:9.00pt"><tspan x="4.0" y="19.0">组件样例</tspan></text></g><g id="shape11" transform="translate(54.13,59.45)"><text xml:space="preserve" style="fill:#191919;font-family:微软雅黑;font-size:10.00pt"><tspan x="8.9" y="32.3">组件的特点包括：1.可独立编译2.携带基础脚本3.独立git仓库4.可被组装</tspan></text></g><g id="shape12" transform="translate(55.00,98.12)"><text xml:space="preserve" style="fill:#191919;font-family:微软雅黑;font-size:10.00pt"><tspan x="8.4" y="23.0">组件包特点包括：1.各组件互不影响2.主要用于发布程序</tspan></text></g><g id="group13" transform="translate(57.00,695.00)"><path stroke-width="1" id="shape14" fill="#b0b4df" stroke="#101843" d="M11.0,.0L513.0,.0C519.1,.0,524.0,4.9,524.0,11.0L524.0,447.0C524.0,453.1,519.1,458.0,513.0,458.0L11.0,458.0C4.9,458.0,.0,453.1,.0,447.0L.0,11.0C.0,4.9,4.9,.0,11.0,.0z" fill-rule="nonzero"/></g><g id="shape15" transform="translate(106.43,713.84)"><text xml:space="preserve" style="fill:#191919;font-family:Microsoft YaHei UI;font-size:9.00pt"><tspan x="4.3" y="38.5">.例子 .env配置文件</tspan><tspan x="4.3" y="55.5">      [pro]</tspan><tspan x="4.3" y="72.5">             pro_name=HelloApp //组件名称</tspan><tspan x="4.3" y="89.5">      [conf]</tspan><tspan x="4.3" y="106.5">             custom_profile=default //自定义配置路径默认default不生效</tspan><tspan x="4.3" y="123.5">      [user]</tspan><tspan x="4.3" y="140.5">             ip_address=192.168.30.215//远程部署ip地址</tspan><tspan x="4.3" y="157.5">             user_name=root//用户名</tspan><tspan x="4.3" y="174.5">             user_password=rockchip//密码</tspan><tspan x="4.3" y="191.5">      [pack]</tspan><tspan x="4.3" y="208.5">             pack_path=installation_package //自定义打包地址</tspan><tspan x="4.3" y="225.5">      [build]</tspan><tspan x="4.3" y="242.5">             build_type=Release //编译debug/relese</tspan><tspan x="4.3" y="259.5">             build_tests=OFF //是否开启集成测试</tspan><tspan x="4.3" y="276.5">      [vers]</tspan><tspan x="4.3" y="293.5">             ver_major=1 //主版本号</tspan><tspan x="4.3" y="310.5">             ver_minor=0 //次版本号</tspan><tspan x="4.3" y="327.5">             ver_patch=1 //修正</tspan><tspan x="4.3" y="344.5">             ver_cycle=a //开发阶段</tspan><tspan x="4.3" y="361.5">     [book]</tspan><tspan x="4.3" y="378.5">             author=mky //组件作者</tspan><tspan x="4.3" y="395.5">             email=1477400876@qq.com //通讯</tspan></text></g><g id="shape16" transform="translate(191.26,692.05)"><text xml:space="preserve" style="fill:#191919;font-family:微软雅黑;font-size:10.00pt"><tspan x="21.0" y="23.0">配置文件示例</tspan></text></g></svg></div>
        <div id="copyright">以上内容仅代表作者本人观点，不代表亿图图示立场。</div>
      </div>
      <div id="navBar">
        <div id="nav-thumbs">
          <div class="nav-thumb">
            <div>
              <span class="number">
                <span class="pagenum">1</span>
              </span>
              <a href="#page1">
                <img src=""/>
              </a>
            </div>
            <p>页-1</p>
          </div>
        </div>
      </div>
    </div>
    <script>
        const svgs=document.getElementById("svg-container").children;
        const UA=window.navigator.userAgent;
        const ua=(UA.indexOf('rv:11')+UA.indexOf('Firefox'))>=0;
        const svgcount=document.getElementById('svg-container').childElementCount;
        var styleArr=[];
        var heightArr=[];
        var navBar=document.getElementById('navBar');
        var conInfo=document.getElementById('content-info');
        for(var i=0;i<svgcount;i++){
            styleArr[i] = {width:svgs[i].getAttribute('width'),height:svgs[i].getAttribute('height')}
        }
        window.onresize=function () {
            renavstyle();
            resvgstyle();
        };
        window.onscroll=renavstyle;
        window.onload=function () {
            renavstyle();
            var sideWidth=navBar.offsetWidth;
            document.getElementById('content-info').style.marginRight=sideWidth+'px';
            document.getElementById('main-content').style.marginRight=sideWidth+'px';
            resvgstyle();
            doscroll();
        };
        function recontainstyle() {
            var topHeight=conInfo.clientHeight;
            var svgHeight=0;
            for(var i=0;i<svgcount;i++){
                heightArr[i]=svgs[i].getBoundingClientRect().height+10;
                svgHeight+=svgs[i].clientHeight ||svgs[i].getBoundingClientRect().height;
            }
            var fullHeight=svgHeight+Number(topHeight);
            if(fullHeight<window.innerHeight){
            document.getElementById('copyright').style.position='absolute';
            document.getElementById('copyright').style.transform ='translateX(-50%)';
            document.getElementById('main-content').style.position='absolute';
            document.getElementById('main-content').style.top=topHeight+'px';
        }else{
            document.getElementById('copyright').style.position='';
            document.getElementById('copyright').style.transform ='';
            document.getElementById('main-content').style.position='';
        }
        }
        function resvgstyle() {
            var sideWidth=navBar.offsetWidth+20;
            for(var i=0;i<svgcount;i++){
                var oriWidth = styleArr[i].width;
                var oriHeight = styleArr[i].height;
                var percent = oriHeight / oriWidth;
                var innerWidth=document.body.offsetWidth-sideWidth;
                if (innerWidth <= oriWidth) {
                    svgs[i].removeAttribute('width');
                    svgs[i].removeAttribute('height');
                    if (ua) {
                        svgs[i].setAttribute('height',innerWidth*percent);
                    }
                }else {
                    svgs[i].setAttribute('width', oriWidth);
                    svgs[i].setAttribute('height', oriHeight);
                }
            }
            recontainstyle();
        }
        function renavstyle() {
            var topHeight=conInfo.clientHeight;
            var scrollTop=document.body.scrollTop||document.documentElement.scrollTop;
            if(scrollTop>topHeight){
                document.getElementById('navBar').style.top=0+'px';
            }else{
                document.getElementById('navBar').style.top=topHeight-scrollTop+'px';
            }
            doscroll();
        }
        function doscroll() {
            var topHeight=conInfo.clientHeight;
            var scrollTop=document.body.scrollTop||document.documentElement.scrollTop;
            for(var i=0;i<svgcount;i++){
                var sum=0;
                for(var j=0;j<=i;j++){
                    sum+=heightArr[j];
                }
                if(scrollTop+window.innerHeight/2-topHeight-sum<0){
                    var sub=Number(i)+1;
                    if(document.querySelector('#nav-thumbs .selected')){
                        document.querySelector('#nav-thumbs .selected').classList.remove('selected');
                    }
                    if(document.querySelector('.nav-thumb:nth-of-type('+sub+')')){
                        document.querySelector('.nav-thumb:nth-of-type('+sub+')').classList.add('selected');
                    }
                    break;
                }
            }
        }
        var navs=document.querySelectorAll('.nav-thumb');
        for(i=0;i<navs.length;i++){
            navs[i].children[0].onclick=function () {
                document.querySelector('#nav-thumbs .selected').classList.remove('selected');
                this.parentNode.classList.add('selected');
            }
        }
</script>
  </body>
</html>
